package cn.yc.student.service.impl;

import cn.yc.student.mapper.StudentMapper;
import cn.yc.student.pojo.Student;
import cn.yc.student.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("StudentService")
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;
    @Override
    public List<Student> select() {
        return studentMapper.select();
    }

    @Override

    public int insert(Student student) {
        int rows = studentMapper.add(student);
        return rows;
    }

    public int delete(int id) {
        return studentMapper.delete(id);
    }


}
